/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


dojo._xdResourceLoaded(function(dojo, dijit, dojox){
return {depends: [["provide", "icubox.MenuItem"],
["require", "dijit._Widget"],
["require", "dijit._Templated"]],
defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["icubox.MenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["icubox.MenuItem"] = true;
dojo.provide("icubox.MenuItem");

//Require some common widget resources
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");

dojo.declare("icubox.MenuItem",
    [dijit._Widget, dijit._Templated], {	
	    	    
	    props : {
				i: { width:96, height:96, top:-16, left:-102 },
				o: { width:64, height:64, top:0, left:-80 }
			},
		// src img
	    imgsrc:"",
        templateString: "<div dojoAttachEvent='onmouseleave:_onMouseLeave,onmouseenter:_onMouseEnter' >"+
                        "<img dojoAttachPoint=\"img\" src=\"${imgsrc}\"  style=\"width:64px; height:64px;\"  /></div>",
       postCreate : function() {         
       },
       _onMouseEnter: function( /*Event*/ e) {
    	   dojo.anim(this.img, this.props.i, 175);
    	   dojo.stopEvent(e);    	        	 
       },
       _onMouseLeave: function( /*Event*/ e) {
    	   dojo.anim(this.img, this.props.o, 175, null, null, 75);
    	   dojo.stopEvent(e);
       }             
   } // end icubox.MenuItem
);

}

}};});
